﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="ModernShopping.User.ProductList" MasterPageFile="~/ModernShopping.Master" %>

<%@ Register Src="~/WebUserControls/UCCountDown.ascx" TagName="Countdown" TagPrefix="MyUserControls" %>
<%@ Register Src="~/WebUserControls/UCPopup.ascx" TagName="Popup" TagPrefix="MyUserControls" %>
<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <div class="div-center">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="title">
            <asp:Label ID="Label1"
                runat="server"
                Text="DANH SÁCH SẢN PHẨM" Width="100%" BorderStyle="None" />
        </div>
        <div class="add-product">
            <div style="width: 90%; margin: 30px auto 30px auto; text-align: right;">
                <asp:DataList runat="server" ID="dlProduct" RepeatColumns="3" CellPadding="10" CellSpacing="10" Width="100%">
                    <ItemTemplate>
                        <table id="hover" runat="server" style="width: 250px; height: 200px;">
                            <tr>
                                <td style="text-align: center">
                                    <asp:LinkButton  runat="server" PostBackUrl='<%#Eval("PostBackUrl") %>' Width="150px" Height="150px">
                                        <asp:Image ID="Image3" runat="server" Height="150px" ImageUrl='<%#Eval("ImageUrl") %>' Width="150px" />
                                    </asp:LinkButton>
                                </td>
                            </tr>
                            <tr>
                                <td class="auto-style3" style="min-height: 150px;">
                                    <asp:Label ID="lblTenSanPham" runat="server" Width="100%" Text='<%# Eval("Name") %>' Font-Size="12pt"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 15px;"></td>
                            </tr>
                            <tr>
                                <td class="auto-style3">
                                    <asp:Label ID="lblGiaSanPham" runat="server" Text='<%# Eval("Price","{0:#,##0} đ") %>' Font-Bold="True" Font-Size="11pt" ForeColor="Red"></asp:Label>
                                </td>
                            </tr>
                        </table>
                        <ajaxToolkit:HoverMenuExtender ID="HoverMenuExtender1" runat="server"
                            PopupControlID="popupImage"
                            TargetControlID="hover"
                            OffsetX="18" OffsetY="160"
                            PopupPosition="Center"
                            PopDelay="100" HoverDelay="100">
                        </ajaxToolkit:HoverMenuExtender>
                        <asp:Panel runat="server" ID="popupImage" BorderColor="#628BD7" BackColor="White"
                            BorderStyle="Solid" BorderWidth="2px">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="text-align: center; width: 50%">
                                        <asp:Button ID="btnUpdate" Style="min-width: 100px;"
                                            Width="100px" runat="server" Text="CẬP NHẬT"
                                            CommandArgument='<%#Eval("ProductCode") %>'
                                            CssClass="button" OnClick="btnUpdate_Click" />
                                    </td>
                                    <td style="text-align: center; width: 50%">
                                        <asp:Button ID="btnDelete" Style="min-width: 100px;"
                                            CommandArgument='<%#Eval("ProductCode") %>'
                                            Width="100px" runat="server" Text="XÓA"
                                            CssClass="button" OnClick="btnDelete_Click" />
                                        <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server"
                                            TargetControlID="btnDelete" ConfirmText="Bạn có chắc là muốn xóa sản phẩm này?">
                                        </ajaxToolkit:ConfirmButtonExtender>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align: center;">
                                        <asp:Button ID="btnDownloadQrCode" runat="server" CommandArgument='<%#Eval("ProductCode") %>' CssClass="button" OnClick="btnDownloadQrCode_Click" Text="TẢI MÃ QR" Width="100px" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </ItemTemplate>
                </asp:DataList>
                <cc1:CollectionPager ID="CollectionPager" runat="server"
                    BackNextDisplay="Buttons" BackNextLocation="Split"
                    BackText="Trang trước"
                    NextText="Trang sau"
                    ControlCssClass="ColectionPagerCss"
                    PageNumbersDisplay="Numbers"
                    PageSize="9" QueryStringKey="Page"
                    MaxPages="5"
                    HideOnSinglePage="True" LabelStyle="" LabelText="" PageNumbersSeparator="&amp;nbsp;" ResultsFormat="">
                </cc1:CollectionPager>
            </div>
        </div>
    </div>
    <MyUserControls:Countdown runat="server" ID="Countdown" />
    <MyUserControls:Popup runat="server" ID="MyPopup" />
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="HeaderContent">
    <style type="text/css">
        .auto-style3 {
            text-align: center;
        }
    </style>
</asp:Content>

